﻿namespace LinqDemo
{
    internal class Program
    {
        static void Main(string[] args)
        {
            try
            {
                //Linq To Object
                {
                    //Linq的扩展语句
                    List<Student> studentlist = new List<Student>();
                    IEnumerable<Student> studentList = studentlist.Where(c => c.Id > 10);
                }
                
                //Linq to SQL
                //四、Linq to Object
                {
                    //Linq扩展语句
                    List<Student> studentlist = new List<Student>(); //集合 
                    IEnumerable<Student> studentList=  studentlist.Where(c => c.Id > 10);//IEnumerable是一个迭代器

                    //studentlist.Where(c => c.Id > 0);//表示查询集合中Id大于0的数据
                    //new LinqShow().Show();
                    //studentlist.GroupBy();
                }
                //五、Linq原理:笔记详解--LinqPrinciple 
                //1. 所谓的Linq扩展语句---是一个扩展泛型方法；
                {
                    new LinqPrinciple().Show();
                }
                //六、常见Ling语句
                {
                    new LinqShow().Show();
                }
                //七、Linq to Everything 笔记详解--LinqPrinciple 
                {

                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
            Console.ReadKey();
        }
    }
}
